import DS from 'ember-data';
import BaseModel from './base-model';

var Building = BaseModel.extend({
  name:DS.attr('string'),//名称
  createDateTime:DS.attr('number'),//创建时间
  createUser:DS.belongsTo('user'),//创建人
  lastUpdateDateTime:DS.attr('number'),//更新时间
  lastUpdateUser:DS.belongsTo('user'),//更新人
  seq:DS.attr('string'),//楼宇编号
  upLandFloorNum:DS.attr('number'),//地上层数
  downLandFloorNum:DS.attr('number'),//地下层数
  remark:DS.attr('string'),//备注
  // floor:DS.hasmany('floor')
  allName:Ember.computed('name','building',function(){
    var name=this.get('building.name')+'-'+this.get('name');
    return name;
  })
});

export default Building;
